package com.icoolkj.mall.order01.service.impl;

import com.icoolkj.mall.common.Result;
import com.icoolkj.mall.order01.dto.OrderResponse;
import com.icoolkj.mall.order01.mapper.OrderMapper;
import com.icoolkj.mall.order01.service.OrderService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * @author icoolkj
 * @version 1.0
 * @description
 * @createDate 2025/01/16 14:44
 */
@Service
public class OrderServiceImpl implements OrderService {

    private Logger logger = LoggerFactory.getLogger(OrderServiceImpl.class);

    @Autowired
    private OrderMapper orderMapper;

    public Result<List<OrderResponse>> getOrderByUserId(Long userId){
        List<OrderResponse> list = orderMapper.getOrderByUserId(userId);
        return Result.ok(list);
    }
}
